﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _3._4_Practices2
{
    class Program
    {
        static void Main(string[] args)
        {
            
            for (int i = 1; i <= 1000; i++) {
                if (i %3 == 0 && i % 5 != 0) {
                    Console.WriteLine(i);
                    continue;
                }

            }
            Console.ReadLine();
        }
    }
}
